package com.icetech.eom.domain.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xuxueli.poi.excel.annotation.ExcelField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author wangzw
 * @since 2018-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value="User对象", description="")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户名称")
    @ExcelField(name = "用户名称")
    private String userName;

    @ApiModelProperty(value = "密码")
    private String pwd;

    @ApiModelProperty(value = "用户类型")
    private Integer userType;

    @ApiModelProperty(value = "手机号码")
    @ExcelField(name = "手机号码")
    private String mobileNo;

    @ApiModelProperty(value = "邮箱")
    @ExcelField(name = "邮箱")
    private String email;

    @ApiModelProperty(value = "公司名称")
    @ExcelField(name = "公司名称")
    private String compName;

    @ApiModelProperty(value = "短信校验码")
    private String vdSms;

    @ApiModelProperty(value = "校验时间")
    private Date vdTime;

    @ApiModelProperty(value = "手机IMEI")
    @TableField("IMEI")
    private String imei;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "排序号")
    private Integer orderNo;

    @ApiModelProperty(value = "是否可用 1 可用，0 不可用")
    private Boolean isEnabled;

    @ApiModelProperty(value = "系统标志 0表示非系统，1表示预装数据")
    private Boolean isSystem;

    private String creator;

    private Date createTime;

    private String modifier;

    private Date modifyTime;

    @ApiModelProperty(value = "机构")
    private Long orgId;

    private Long devPl;

    @ApiModelProperty(value = "用户拥有角色")
    @TableField(exist = false)
    private List<Role> roles;

    @ApiModelProperty(value = "用户拥有的权限")
    @TableField(exist = false)
    private List<Permission> permissions;

}
